<%@page import="cn.yi.newsys.pojo.NewsCategory"%>
<%@page import="cn.yi.newsys.service.impl.NewsCategoryServiceImpl"%>
<%@page import="cn.yi.newsys.service.NewsCategoryService"%>
<%@page import="java.util.List"%>
<%@page import="cn.yi.newsys.service.impl.UserServiceImpl"%>
<%@page import="cn.yi.newsys.service.UserService"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>新闻中国后台管理系统</title>
    <!-- Bootstrap -->
    <link href="../css/bootstrap.min.css" rel="stylesheet">
    <!-- Font Awesome -->
    <link href="../css/font-awesome/css/font-awesome.min.css" rel="stylesheet">
    <!-- NProgress -->
    <link href="../css/nprogress/nprogress.css" rel="stylesheet">
    <!-- Custom Theme Style -->
    <link href="../css/custom.min.css" rel="stylesheet">
    <style type="text/css">
     .x_content form ul {
       list-style: none;
     }
     .x_content form ul li{
       width: 350px;
       display: inline-block;
       height:40px;
       line-height: 40px;
       vertical-align: middle;
     }
     .tooltip{
     z-index:9999999999;
     }
     .dropdown-menu{
     min-width:105px;
     }
    </style>
</head>

<body class="nav-md">
	<div class="container body">
		<div class="main_container">
			<%@include file="header.jsp"%>
			<!-- page content -->
			<div class="right_col" role="main">
				<div class="row">
					<div class="col-md-12">
						<div class="x_panel">
							<div class="x_title">
								<h2>
									新闻主题信息管理维护 <i class="fa fa-user"></i><small>当前操作用户-您可以通过搜索或者其他的筛选项对新闻主题的信息进行修改、删除等管理操作。^_^</small>
								</h2>
								<div class="clearfix"></div>
							</div>
							<div class="x_content">
								<form method="post" action="list">
									<input type="hidden" name="pageIndex" value="1" />
									<ul>
										<li>
											<div class="form-group">
												<label class="control-label col-md-3 col-sm-3 col-xs-12">主题名</label>
												<div class="col-md-6 col-sm-6 col-xs-12">
													<input name="queryUserName" type="text"
														class="form-control col-md-7 col-xs-12">
												</div>
											</div>
										</li>
									
										<li><button type="submit" class="btn btn-primary">
												查 &nbsp;&nbsp;&nbsp;&nbsp;询</button></li>
									</ul>
								</form>
							</div>
						</div>
					</div>
					<div class="col-md-12 col-sm-12 col-xs-12">
						<div class="x_panel">
							<div class="x_content">
								<p class="text-muted font-13 m-b-30"></p>
								<div id="datatable-responsive_wrapper"
									class="dataTables_wrapper form-inline dt-bootstrap no-footer">
									<div class="row">
										<div class="col-sm-12">
											<a href="themeadd.jsp" class="btn btn-success btn-sm" target="_blank">新增主题</a>
											<table id="datatable-responsive"
												class="table table-striped table-bordered dt-responsive nowrap dataTable no-footer dtr-inline collapsed"
												 role="grid"
												aria-describedby="datatable-responsive_info"
												style="width: 100%;">
												<thead>
													<tr role="row">
														<th class="sorting_asc" tabindex="0"
															aria-controls="datatable-responsive" rowspan="1"
															colspan="1"
															aria-label="First name: activate to sort column descending"
															aria-sort="ascending">主题编号</th>																							
														<th class="sorting" tabindex="0"
															aria-controls="datatable-responsive" rowspan="1"
															colspan="1"
															aria-label="Last name: activate to sort column ascending">
															主题名</th>
														<th class="sorting" tabindex="0"
															aria-controls="datatable-responsive" rowspan="1"
															colspan="1" style="width: 124px;"
															aria-label="Last name: activate to sort column ascending">
															操作</th>
													</tr>
												</thead>
												<tbody>	
												
													<%
														NewsCategoryService ncs = new NewsCategoryServiceImpl() ;
														List<NewsCategory> list = ncs.showAllNewsCategory() ;
														if(list.size() > 0){
															for(NewsCategory nc : list){
													%>
													<tr role="row" class="odd">
															<td tabindex="0" class="sorting_1"><%=nc.getId() %></td>
															<td><%=nc.getName() %></td>													
															<td>
																<div class="btn-group">
																	<button type="button" class="btn btn-danger">点击操作</button>
																	<button type="button"
																		class="btn btn-danger dropdown-toggle"
																		data-toggle="dropdown" aria-expanded="false">
																		<span class="caret"></span>
																	</button>
																	<ul class="dropdown-menu" role="menu">															
																		<li><a class="modifyVersion"																			
																			data-toggle="tooltip" data-placement="top" title=""
																			data-original-title="修改用户的基本信息">修改主题</a></li>
																		<li><a class="deleteApp"
																			data-toggle="tooltip" data-placement="top" title=""
																			data-original-title="删除用户的基本信息">删除主题</a></li>
																	</ul>
																</div>
															</td>
														</tr>
													<% 		}
														}
													 %>							
														
												</tbody>
											</table>
										</div>
									</div>
									<div class="row">
										<div class="col-sm-5 col-md-5">
											<div class="dataTables_info" id="datatable-responsive_info"
												role="status" aria-live="polite">共<%=list.size() %>条记录
												1/1页</div>
										</div>
										<div class="col-sm-7 col-md-7">
											<div class="dataTables_paginate paging_simple_numbers"
												id="datatable-responsive_paginate">
												<ul class="pagination">
														<li class="paginate_button previous"><a
															href="#"
															aria-controls="datatable-responsive" data-dt-idx="0"
															tabindex="0">首页</a></li>
														<li class="paginate_button"><a
															href="#"
															aria-controls="datatable-responsive" data-dt-idx="1"
															tabindex="0">上一页</a></li>									
														<li class="paginate_button"><a
															href="#"
															aria-controls="datatable-responsive" data-dt-idx="1"
															tabindex="0">下一页</a></li>
														<li class="paginate_button next"><a
															href="#"
															aria-controls="datatable-responsive" data-dt-idx="7"
															tabindex="0">最后一页</a></li>
												</ul>
											</div>
										</div>
									</div>
								</div>

							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
		<!-- /page content -->

		<!-- footer content -->
		<footer>
			<div class="pull-right">&copy;朝夕科技</div>
			<div class="clearfix"></div>
		</footer>
		<!-- /footer content -->
	</div>

	<!-- jQuery -->
	<script src="../js/jquery-1.12.4.js"></script>
	<!-- Bootstrap -->
	<script src="../js/bootstrap.min.js"></script>
	<!-- FastClick -->
	<script src="../js/fastclick.js"></script>
	<!-- NProgress -->
	<script src="../css/nprogress/nprogress.js"></script>

	<!-- Custom Theme Scripts -->
	<script src="../js/custom.min.js"></script>
</body>
</html>